﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using System.ServiceModel;


namespace SchemesServer.WCFServer
{
    [ServiceContract]
    public interface ISchemesServer
    {
        /// <summary>
        /// 获取方案文件名列表（不包含扩展名）
        /// </summary>
        /// <returns></returns>
        [OperationContract]
        string[] GetSchemes(); 

        /// <summary>
        /// 下载方案文件
        /// </summary>
        /// <param name="file">数据文件对象</param>
        /// <param name="password">验证密码</param>
        /// <param name="hdSerialNumbers">磁盘序列号</param>
        /// <returns></returns>
        [OperationContract]
        DataInfo GetSchemeContent(DataInfo file,string password,string hdSerialNumbers);

        /// <summary>
        /// 下载方案文件
        /// </summary>
        /// <param name="file">数据文件对象</param>
        /// <param name="password">验证密码</param>
        /// <param name="hdSerialNumbers">磁盘序列号</param>
        /// <returns></returns>
        [OperationContract]
        DataInfo GetSchemeContentImpl(DataInfo file,string password);

        /// <summary>
        /// 上传方案文件
        /// </summary>
        /// <param name="file">数据文件对象</param>
        /// <param name="password">验证密码</param>
        /// <returns></returns>
        [OperationContract]
        DataInfo UpDataScheme(DataInfo file, string password);

        /// <summary>
        /// 删除方案文件
        /// </summary>
        /// <param name="schemeName">方案名称</param>
        /// <param name="password">验证密码</param>
        /// <returns></returns>
        [OperationContract]
        string DeleteScheme(string schemeName,string password);

        /// <summary>
        /// 获取客户端授权文件
        /// </summary>
        /// <param name="Sn">客户端磁盘序列号（多磁盘，任意选一个）</param>
        /// <returns></returns>
        [OperationContract]
        byte[] GetClientLicense(string Sn);
    }
}
